#!/bin/env python
# -*- coding:utf-8 -*-

from downloader import download, Proxy

urls = []
with open('url') as fout:
    for line in fout:
        urls.append(line.strip())

download(urls,
         fail_log='fail.log',
         fail_log_append=False,
         # check_only=True
         proxy=Proxy().backup_url(lambda x: x.replace(".jpg", ".png"))
         )
